---
title: "User Manual: Total VFD Integration"
space: "vfd provider"
url: "https://support.aakvatech.com/VFD Provider-Total VFD Integration"
updated: "2026-07-22"
---

**User Manual: Total VFD Integration**

---

### 1. Overview
Total VFD Integration facilitates seamless posting of fiscal receipts from ERPNext to the Total VFD (Virtual Fiscal Device) system as mandated by revenue authorities. This setup ensures that all eligible Sales Invoices are sent to the Total VFD and appropriate acknowledgments are recorded.

### 2. Key Features
- Posting Sales Invoice data to Total VFD in real-time
- Supports VAT grouping for tax reporting
- Auto-calculation of VAT-inclusive amounts
- Secure storage of bearer tokens and business credentials
- Retry mechanism for API calls
- Maintains traceability through linked VFD Provider Posting records

### 3. Pre-Requisites
- Valid credentials (Serial ID, Bearer Token, X Active Business Key)
- Total VFD Provider configured under "VFD Provider"
- Items must have tax templates with VFD tax code mappings
- Sales Invoices should be properly configured with customer VFD details

### 4. Step-by-Step Usage
**Configuration:**
1. Go to **Total VFD Setting** and set:
   - Company (Linked)
   - Serial ID
   - Bearer Token & X Active Business (Set as password fields)
   - TIN & VRN if needed
   - Enable **Is VAT Grouped** if needed

**Usage:**
1. Create and submit a Sales Invoice.
2. Upon submission, if VFD integration is enabled, the invoice is automatically posted to Total VFD.
3. Details such as RCTVNUM, Date, Time, and Verification URL are returned and stored.
4. VFD Provider Posting is generated for audit.

### 5. Script Customizations
- `post_fiscal_receipt(doc, method)` handles invoice formatting, VAT grouping, and payload generation.
- `send_total_vfd_request()` handles API communication with retry logic.
- VAT group logic is controlled by the `is_vat_grouped` checkbox.
- Item VAT type is determined via the Item Tax Template field `vfd_taxcode`.

### 6. Troubleshooting (Common Errors and Resolutions)
| Error Message | Cause | Resolution |
|---------------|-------|------------|
| `Error is 401` | Invalid bearer token | Regenerate token via Total VFD portal |
| `Connection failure` | API unreachable | Check internet or firewall rules |
| `Error is 409` | Duplicate submission | Ignore if already received successfully |

### 7. User Roles and Permissions
- **System Manager** has full control (Read, Write, Create, Delete)
- Ensure only authorized personnel can access token and sensitive fields

### 8. Key Notes
- Fields such as `bearer_token` and `x_active_business` are stored securely
- Timestamp values are auto-set using `nowdate()` and `nowtime()` utilities
- This system supports both VAT grouped and itemized receipts

### 9. What Business Process Pain Point Does It Help Remove
This integration removes the manual process of:
- Entering Sales Invoices separately in the revenue authority system
- Tracking fiscal receipts and tax calculations manually
- Managing duplicate fiscal receipt issues or compliance gaps

It ensures compliance with fiscal policies and saves time by automating VFD communications and storage of responses.

